import launchPad from './src/main.vue'
import {App, createVNode, render} from "vue";
import {setTimer} from "@/helper";

const run  = () => {
    const VNode = createVNode(launchPad)
    const content: any = document.createElement('div')
    render(VNode, content)
    document.body.appendChild(content.firstElementChild)
    setTimer(() => {
        document.getElementById('launchPad')?.classList.remove('start')
    },500,1)
}
const close = () => {
    document.getElementById('launchPad')?.classList.add('out')
    setTimer(() => {
        document.getElementById('launchPad')?.remove()
    },500,1)
}
launchPad.run = () => {
    const dom = document.getElementById('launchPad')
    dom ? close() : run()
}
export default launchPad